; FORMULABUILDER Test Expression Set ; Lines starting with a semicolon are ignored; ; " Tan(90)/Cos(90) = " + Str( TAN(90) / COS(90) ) 'A' > 'B' 'Current Balance '+padright( '$'+Str(weekday(today()) * 10)+'.50', 10,'*') 'Days this month '+str(choose(month(today()),31,28,31,30,31,30,31,31,30,31,30,31) ) 'The fractional value of Cos(10) = '+Str(Frac(Cos(10))) 'The square root of 89 is '+str( sqrt(89) ) 'This tests the error-trapping ability of FB '+Str(1/0) 'Today is '+Choose(weekday(Today()),"Sun","Mon","Tue","Wed","Thu","Fri","Sat") 1 and 13 10^2 13 mod 3 7 or 8 17 div 2 ABS( Cos(90) ) ABS(-10) ACOS(-0.5) ACOSH(6) ACOT(.70) ACOTH(4) ACSC(0.5) CSC(0.75) ACSCH(2) ASC('z') ASEC(0) ASECH(0.5) ASIN(1) ASINH(1.5) ATAN(1.75) ATANH(0.5) ATAN2(-1,-1) AVG(1,2,3,4,5,6,7, MAX(1,2,3,4,5) ) CEILING(10.22) Char(32) <= '$' char(74) CLEAN(char(90)+char(194)+char(178)+' clean string '+char(180)) CODE('m') COS( PI ) COSH(1.5) COT(pi) COTH(1) CSCH(1) DATE( month(today()), day(Today()), year(today()) ) DATETOSTR( Today() + 7) DEGREES(1.75) EXP( ln(e) ) EXP(-1.25) EXTRACT(4,'returned should be returned',' ') FACT(10) FIND('.',str(cos(45))) FIRST(8,'The rain in Spain') HOUR( TimeNow() ) IIF(dayname(today())='Monday','Whered the weekend go',Str(6-Weekday(today()))+' days till friday !') INT(10.9) ISEVEN(57) ISODD(57) LENGTH('The length of this string is 31') LOG(100) LOG(100,10) LOG(8,2) LOWER('JUST SO YOU WONT SHOUT AT ME') LTRIM('******$99.00','*') MAX( Cos(PI) , SIN(PI) , ATAN(PI) , CSC(PI) , COT(PI) ) MID("Test is what this should return",4) MID("This should return Test",20,4) MINUTE( TimeNow() ) NOW() PADCENTER('Centered String',45,'*') PRODUCT(1,80,6,5,4,3,2,2) PROPER('SAMuEL wooDSON') RADIANS(90) REPLACE('Please send the IRS your taxes','the IRS','me') REPLICATE(char(196),30) RTRIM('I hate trailing spaces ',' ') SECH(0) SGN(-9) SIN( radians(90) ) SINH(1) SOUNDALIKE('dead','head') SOUNDEX('haywood') SOUNDEX('Wayward') SQR(10) SQRT(144) STR(1024.678) INSERT(' NOT ','The moon is made of green cheese',12) MAXSTR('Daniel','Mary','Ian','Alicia','Paul','Barbara','Lushena') MINSTR('well','trained','horsemen','ride','swiftly') SUM(1,10,19,25,36,18) TAN(PI) TANH(1) TIME(10,10,10) TODAY() + 10 TODAY() > {10/10/95} TRIM(' both leading and trailing strings trimmed ') TRUE & FALSE TRUE | FALSE UPPER('just so you dont feel so down..') VAL("100.678") WORDCOUNT('This function, if successful, should return 7',' ,') DATEDIFF(today(), {10/10/2001}) DATEVALUE("10/10/96") DAY( Today() ) DAYNAME( today() ) DB(10000,1200,8,5) DEGREES( 10.0245 ) FLOOR(25.43) INT(499.99) LN( e ) MIN(10, 6, month(today()), cos(pi) ) MONTH( Today() ) MONTHNAME( Today() + 45 ) PADLEFT("I hate right justification",40,"*") "Check Amount "+PADRIGHT("$"+Str(10000,2),10,"*") RAND() RAND(5) RAND(1,10) LAST(6,"Reading is fundamental") ROUND(134.578) SEC(1.23) SECOND( timenow() ) SGN( cos(pi) ) TERM(300,.06,5000) TIME(10,10,35) TIMENOW() TIMETOSTR( Today() + 365 ) TIMEVALUE("12:54 am") TODAY() VAL("365" + ".456") WEEKDAY(Today() + 5) YEAR( Today() ) ; Thanks to JW Rider for the financial routines ; FORMULABUILDER Financial Functions are, for the most part, ; compatible with those of Quattro Pro 3.0 ; The examples are derived from the Quattro Pro 3.0 @Functions ; and Macros manual ; ; page 29 (CTERM) ; str(cterm(0.07,5000,3000) , 2) str(nper(0.07,0,-3000,5000,0), 2) + '(nper)' str(cterm(0.1,5000,3000), 6) str(cterm(0.12,5000,3000), 6) str(cterm(0.12,10000,7000), 6) ; ; pages 35-36 (DDB): ; ddb(4000,350,8,2) ddb(15000,3000,10,1) ddb(15000,3000,10,2) ddb(15000,3000,10,3) ddb(15000,3000,10,4) ddb(15000,3000,10,5) ; ; 'page 48 (FV): ; str(fv(500,0.15,6),2) str(fval(0.15,6,-500,0,0),2) str(fv(200,0.12,5),2) str(fv(500,0.9,4),2) str(fv(800,0.9,3),2) str(fv(800,0.9,6),2) ; ; 'page 49 (FVAL):' str(fval(0.15,6,-500,0,1),2) str(fval(0.15,6,-500,-340,1),2) ; ; page 57 (IPAYMT): ; str( ipaymt(0.1/12,2*12,30*12,100000,0,0),2 ) ; ; pages 57-58 (IRATE): ; str( irate(5*12,-500,15000,0,0),5) str( irate(5,-2000,-2.38,15000,0) , 4) ; ; pages 60-61 (IRR): ; str( irr(0,-10,150,-145)*100 , 2) +'%' str( irr(10,-10,150,-145)*100, 0) +'%' str( irr(0,-10,150.1,-145)*100 , 2) +'%' str( irr(10,-10,150.1,-145)*100, 0 ) + '%' str( irr(0,-3000,700,600,750,900,1000,1400)*100 , 2) +'%' str( irr(0,-50000,-8000,2000,4000,6000,5000,4500)*100 , 2) +'%' str( irr(0,-10000,1000,1000,1200,2000,3000,4000)*100 , 2) +'%' ; ; page 73 (NPER): ; str( nper(0.115,-2000,-633,50000,0),2 ) ; ; page 75 (NPV): ; str( npv(0.1,-5000,2000,2000,2000,2000, 0) ) str( -5000 + npv(0.1,2000,2000,2000,2000,0), 2 ) str( npv(0.0125, 8000,9000,8500,9500,10000,11000,10000) ,2 ) npv(0.15/12, 200,350,-300,600,700,1000,1200) npv(0.15/12,3500,4000,3000,5000,4000,6500,7000) ; ; page 77 (PAYMT): ; str(paymt(0.175/12,12*30,175000,0,0),2) str(paymt(0.175/12,12*30,175000,0,1),2) str(paymt(0.175/12,12*30,175000,-80000,0),2) ; ; pages 78-79 (PMT) ; str(PMT(10000,0.15/12,3*12),2) str( PAYMT(0.15/12,3*12,10000,0,0), 2) + '(paymt)' str(pmt(1000,0.12,5) ,2 ) str(pmt(500,0.16,12), 2) str(pmt(5000,0.16/12,12) ,2) str(pmt(12000,0.11,15) ,2 ) ; ; page 79 (PPAYMT): ; str(ppaymt(0.1/12,2*12,30*12,100000,0,0), 2) str(ppaymt(0.15/4,24,40,10000,0,1), 2) ; ; page 81 (PV) ; str(pv(350,0.07/12,5*12),2) str(pval(0.07/12,5*12,-350,0,0), 2) str(pv(277,0.12,5),2) str(pv(600,0.17,10),2) str(pv(100,0.11,12),2) ; ; page 82 (PVAL) ; str(pval(0.1,12,2000,0,0),2) str(pval(0.1,15,0,30000,0),2) ; ; page 84 (RATE) ; str( rate(4000,2000,10)*100, 2) + '%' str( rate(10000,7000,6*12)*100, 2) + '%' str( rate(1200,1000,3)*100, 2) + '%' str( rate(500,100,25)*100, 2) + '%' ; ; page 89 (SLN) ; str(sln(4000,350,8),2) str(sln(15000,3000,10), 0) sln(5000,500,5) sln(1800,0,3) ; ; pages 94-95 (SYD) ; str( syd(4000,350,8,2),2) syd(12000,1000,5,1) syd(12000,1000,5,2) syd(12000,1000,5,3) syd(12000,1000,5,4) syd(12000,1000,5,5) ; ddb(12000,1000,5,1) ddb(12000,1000,5,2) ddb(12000,1000,5,3) ddb(12000,1000,5,4) ddb(12000,1000,5,5) ; ; page 96 (TERM) ; str( term(2000,0.11,50000),2) str( nper(0.11,-2000,0,50000,0) , 2) str( term(300,0.06,5000) , 1) str( term(500,0.07,1000) , 2) str( term(500,0.07,1000) , 2) str( term(1000,0.10,50000) , 1) str( term(100,0.05,1000) ,1)